<?php


# Created on: 2011-12-10 23:36:20 616

/**
* Perform a block action in entities. Input is via POST only
*/

$action = $variable->post('action', 'string', '');
$ids = $variable->post('sizes', 'array', array());
#print_r($_POST); print_r($ids); die();

# Safety preceutions, make all the IDs a list of numbers only.
$ao = new array_operation();
$ids = $ao->operate('numeric', $ids);
$ids = array_filter($ids);
if(!count($ids)) $ids = array(0);

$sizes = new sizes();

switch($action)
{
case 'delete':
case 'disable':
case 'enable':
case 'prune':
	$sizes->blockaction($action, $ids);
	break;
case 'nothing':
default:
	break;
}

/**
* Go back to the page that referred here.
*/
headers::back('sizes-list.php');
?>